package com.cn.lp.service;

import com.cn.lp.api.TestApiClient;
import com.cn.lp.param.GetRequestParam;
import com.cn.lp.param.HeaderParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.PostConstruct;

/**
 * Description: 请描述你的文件
 *
 * @author wuqirong
 * @date 2023-06-24
 * <p>
 * All rights Reserved, Designed www.xiao100.com
 */
@Service
public class TestService {

    @Autowired
    private TestApiClient testApiClient;

    @PostConstruct
    public void init() {
        GetRequestParam getRequestParam = new GetRequestParam();
        getRequestParam.setName("我是HelloWorld");
        getRequestParam.setAge(10);
        HeaderParam headerParam = new HeaderParam();
        headerParam.setKeyA("我是key2");
        headerParam.setKeyB("我是Key1");
        String test = testApiClient.test(getRequestParam, headerParam);
        System.out.println("testApiClient返回的结果：" + test);
    }

}
